package com.sxbbc.common.core.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sxbbc.common.core.entity.jz.CDonateDetail;
import com.sxbbc.common.core.enums.HandleTypeEnums;
import com.sxbbc.common.core.mapper.jz.CDonateDetailMapper;
import com.sxbbc.common.core.service.ICDonateDetailService;
import com.sxbbc.common.core.utils.BasePage;

/**
 * <p>
 * 用户贡献值明细 服务实现类
 * </p>
 *
 * @author xiaoky
 * @since 2019-06-03
 */
@Service
public class CDonateDetailServiceImpl extends ServiceImpl<CDonateDetailMapper, CDonateDetail> implements ICDonateDetailService {
	@Autowired
	private CDonateDetailMapper cDonateDetailMapper;
	
	@Override
	public IPage<CDonateDetail> queryCustomerDonateList(BasePage<CDonateDetail> page, CDonateDetail donateDetail) {
		IPage<CDonateDetail> pageList = cDonateDetailMapper.queryCustomerDonateList(page, donateDetail);
        for (CDonateDetail record : pageList.getRecords()) {
            record.setTypeName(HandleTypeEnums.getName(record.getTypeId()));
            record.setCid(null);
        }
        return pageList;
	}

}
